package com.vend.hardware3.view

import android.os.Bundle
import com.vend.common.base.BaseActivity
import com.vend.common.mvp.IView
import com.vend.hardware3.R
import com.vend.hardware3.presenter.HardWare3MainPresenter
import kotlinx.android.synthetic.main.activity_hardware3_home.*

/**
 * 硬件模块的显示
 * 先实现HardWareView中定义的全部UI控制显示逻辑
 * 继承BaseActivity
 */
class HardWare3MainActivity : BaseActivity<HardWare3MainPresenter>(),HardWare3View {
    //设置布局
    override fun getContentLayoutId(): Int {
        return R.layout.activity_hardware3_home
    }
    //初始化逻辑可在这里实现
    override fun initView(savedInstanceState: Bundle?) {
        mPresenter = HardWare3MainPresenter(this,this)
        mPresenter?.start()
    }

    override fun onDestroy() {
        super.onDestroy()
        //销毁的逻辑处理
        mPresenter?.stop()
    }

    override fun showModelTitle(str : String) {
        hard_ware_title.text = str
    }
}
//这个接口就是定义全部界面的UI显示
interface HardWare3View: IView{
    //显示标题
    fun showModelTitle(str : String)

}